package com.chenliwu.demo.java8.lambda;

/**
 * Lambda表达式Demo
 *
 * @author chenlw 2021-11-13
 * @since 1.0.0
 */
public class LambdaDemo {

    public static void main(String[] args) {
        lambdaRunnableDemo();
    }

    public static void lambdaRunnableDemo() {
        // 表达式只有一条语句时，花括号可以省略，语法更加简洁
        Runnable runnable = () -> System.out.println("Lambda Demo");
        Thread thread = new Thread(runnable);
        thread.start();
    }

}
